hi.
i have a function like this
when i call it with my dynamic matrix everything is ok.Code:void print_matrix(int **t)
but if i call it with a static matrix i obtain a warning (and a segmentation foult )Code:int **Dmatrix; Dmatrix = malloc(N * sizeof(int*)); //N righe for (i = 0; i < N; i++) { Dmatrix[i] = malloc(N * sizeof(int)); } print_matrix(Dmatrix);
warning is:Code:int Smatrix[N][N]; print_matrix(Smatrix);
warning: passing argument 1 of ‘print_matrix’ from incompatible pointer type